<template>
  <div class="home">
<!--    <img alt="Vue logo" src="../assets/logo.png">-->
<!--    <HelloWorld msg="Welcome to Your Vue.js App"/>-->
    <Header></Header>
    <div style="max-width: 1000px; margin:auto">
      <div style="font-size: 25px;margin-top: 45px;margin-bottom: 40px;">
        公开项目
      </div>
      <div v-for="item in this.projects">

        <ProjectBrief :item="item"></ProjectBrief>
      </div>
    </div>
  </div>
</template>

<script>
// @ is an alias to /src
import Header from "@/components/Header";
import ProjectBrief from "@/components/ProjectBrief";

export default {
  name: 'Public',
  components: {
    Header,
    ProjectBrief
  },
  data(){
    return {
      projects:[]
    }
  },
  mounted() {
    this.$axios('projects/all/').then(res=>{
      console.log(res)
      this.projects = res.data
    })
  }
}
</script>
